GtkStyleContext: fix typos in code.
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 23 Apr 2010 00:33:01 +0000 (02:33 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:37:09 +0000 (15:37 +0100)
The wrong list was being modified in gtk_style_context_set_child_class(),
and gtk_style_context_has_child_class() was checking for *flags != 0, not
flags != NULL.

gtk/gtkstylecontext.c

index c4401cc155cf8b8c9539c75b1baab523e1de5f96..d0f95cf98932ba86d40f3563386496fcf8cced4e 100644 (file)
@@ -513,7 +513,7 @@ gtk_style_context_set_child_class (GtkStyleContext    *context,
 
   priv = GTK_STYLE_CONTEXT_GET_PRIVATE (context);
   class_quark = g_quark_from_string (class_name);
-  link = priv->style_classes;
+  link = priv->child_style_classes;
 
   while (link)
     {
@@ -537,10 +537,10 @@ gtk_style_context_set_child_class (GtkStyleContext    *context,
   child_class->flags = flags;
 
   if (link)
-    priv->style_classes = g_list_insert_before (priv->style_classes,
-                                                link, child_class);
+    priv->child_style_classes = g_list_insert_before (priv->child_style_classes,
+                                                      link, child_class);
   else
-    priv->style_classes = g_list_append (priv->style_classes, child_class);
+    priv->child_style_classes = g_list_append (priv->child_style_classes, child_class);
 }
 
 void
@@ -603,7 +603,7 @@ gtk_style_context_has_child_class (GtkStyleContext    *context,
 
   if (link)
     {
-      if (*flags_return)
+      if (flags_return)
         {
           GtkChildClass *found_class;